<%@page contentType="text/html;charset=utf-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<title>员工列表</title>
		<link rel="stylesheet" type="text/css" href="../css/style.css" />
		<meta http-equiv=Content-type content="text/html;charset=utf-8"/>
	</head>
	<body>

		<div id="wrap">
			<div id="top_content">
				<%@include file="header.jsp"%>
				<div id="content">

					<p id="whereami">
						欢迎你:${requestScope.user_detail.realname}
						<a href="#">登出</a>
					</p>
					<h1>
						员工信息
					</h1>
					<form action="emp_delete" onsubmit="return confirm('确认删除')">
						<table class="table">
							<tr class="table_header">
								<td>
								</td>
								<td>
									姓名
								</td>
								<td>
									入职时间
								</td>
								<td>
									所属部门
								</td>
							</tr>

							<c:forEach items="${requestScope.empList}" var="emp">
								<tr class="row1">
									<td>
										<input type="checkbox" name="empId" value="${emp.id}" />
									</td>
									<td>
										<a href="emp_update_form?id=${emp.id }">
											${emp.name}
										</a>
									</td>
									<td>
										${emp.hireDate}
									</td>
									<td>
										${emp.dept.name}
									</td>
								</tr>
							</c:forEach>
						</table>
						<center>
							<input type="submit" class="button" value="删除员工 &raquo" />
							<input type="button" class="button" value="新增员工 &raquo" onclick="location='emp_add_form'" ;/>
						</center>
					</form>
				</div>
			</div>

			<%@include file="footer.jsp"%>
		</div>
	</body>
</html>